use tokio::fs;

use crate::error::IoErr;



pub const DATA_DIR: &'static str = "./data";
pub const HTML_DIR: &'static str = "./data/html";
pub const SQLITE_DATA_PATH: &'static str = "sqlite://./data/data.db?mode=rwc";

pub const WEB_SERVER_ADDR: &'static str = "0.0.0.0:3433";

pub async fn init() -> Result<(), IoErr> {

    fs::create_dir_all(DATA_DIR).await?;
    fs::create_dir_all(HTML_DIR).await?;
    Ok(())
}



